home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / cmds / sysstat / RCS / sysStat.c,v < prev    next >
Encoding:
Text File  |  1988-12-22  |  18.1 KB  |  711 lines

  1. head     1.5;
  2. branch   ;
  3. access   ;
  4. symbols  ;
  5. locks    ; strict;
  6. comment  @ * @;
  7.  
  8.  
  9. 1.5
  10. date     88.09.26.17.26.53;  author douglis;  state Exp;
  11. branches ;
  12. next     1.4;
  13.  
  14. 1.4
  15. date     88.07.12.16.43.09;  author douglis;  state Exp;
  16. branches ;
  17. next     1.3;
  18.  
  19. 1.3
  20. date     88.02.21.15.57.08;  author douglis;  state Exp;
  21. branches ;
  22. next     1.2;
  23.  
  24. 1.2
  25. date     87.09.15.16.04.18;  author brent;  state Exp;
  26. branches ;
  27. next     1.1;
  28.  
  29. 1.1
  30. date     87.08.24.10.21.56;  author brent;  state Exp;
  31. branches ;
  32. next     ;
  33.  
  34.  
  35. desc
  36. @the sysStat program.
  37. @
  38.  
  39.  
  40. 1.5
  41. log
  42. @changed msgs for allow/refuse migration
  43. @
  44. text
  45. @/*
  46.  * sysStat.c --
  47.  *
  48.  *    Statistics generation for system calls and process migration.
  49.  *
  50.  * Copyright 1986, 1988 Regents of the University of California
  51.  * Permission to use, copy, modify, and distribute this
  52.  * software and its documentation for any purpose and without
  53.  * fee is hereby granted, provided that the above copyright
  54.  * notice appear in all copies.  The University of California
  55.  * makes no representations about the suitability of this
  56.  * software for any purpose.  It is provided "as is" without
  57.  * express or implied warranty.
  58.  */
  59.  
  60. #ifndef lint
  61. static char rcsid[] = "$Header: sysStat.c,v 1.4 88/07/12 16:43:09 douglis Exp $ SPRITE (Berkeley)";
  62. #endif not lint
  63.  
  64. #include "sprite.h"
  65. #include "fs.h"
  66. #include "sysStats.h"
  67. #include "mem.h"
  68. #include "byte.h"
  69. #include "cvt.h"
  70. #include "io.h"
  71. #include "option.h"
  72. #include "kernel/sysSysCall.h"
  73. #include "kernel/trace.h"
  74. #include "kernel/procMigrate.h"
  75.  
  76. /*
  77.  * Variables for options.
  78.  */
  79.  
  80. Boolean countCalls = FALSE;
  81. Boolean allowMigration = FALSE;
  82. Boolean refuseMigration = FALSE;
  83. Boolean getMigStatus = FALSE;
  84. Boolean doMigration = FALSE;
  85. Boolean startTrace = FALSE;
  86. Boolean stopTrace = FALSE;
  87. Boolean resetCount = FALSE;
  88. Boolean printVersion = FALSE;
  89. int debugLevel = -1;
  90. int numRecords = 200;
  91.  
  92. Option optionArray[] = {
  93.     {OPT_TRUE, 'c', (Address)&countCalls,
  94.      "Print the number of system calls invoked."},
  95.     {OPT_INT, 'd', (Address)&debugLevel,
  96.      "Level to set proc_MigDebugLevel."},
  97.     {OPT_TRUE, 'S', (Address)&getMigStatus,
  98.      "Print whether process migration is allowed."},
  99.     {OPT_TRUE, 'a', (Address)&allowMigration,
  100.      "Allow future migrations to this machine (must be root)."},
  101.     {OPT_TRUE, 'r', (Address)&refuseMigration,
  102.      "Disallow future migrations to this machine (must be root)."},
  103.     {OPT_TRUE, 'm', (Address)&doMigration,
  104.      "Print process migration statistics."},
  105.     {OPT_INT, 'n', (Address)&numRecords,
  106.      "Number of process migration records to print."},
  107.     {OPT_TRUE, 'R', (Address)&resetCount,
  108.      "Reset the count of system calls to 0."},
  109.     {OPT_TRUE, 't', (Address)&startTrace,
  110.      "Enable tracing of process migration."},
  111.     {OPT_TRUE, 'T', (Address)&stopTrace,
  112.      "Disable tracing of process migration."},
  113.     {OPT_TRUE, 'V', (Address)&printVersion,
  114.      "Print compilation timestamp for the kernel."},
  115. };
  116. int numOptions = sizeof(optionArray) / sizeof(Option);
  117.  
  118. /*
  119.  * Constants used by tracing routines:
  120.  *     PROC_NUM_EVENTS - the number of valid trace events for proc.\
  121.  */
  122.  
  123. #define PROC_NUM_EVENTS 5
  124.  
  125. /*
  126.  * List of system calls to print out, corresponding to call number.
  127.  * Whether or not they're local should be taken from some other
  128.  * file in the kernel rather than repeated here....
  129.  */
  130.  
  131. typedef struct {
  132.     char *name;
  133.     Boolean local;
  134. } SysCallInfo;
  135.  
  136. static SysCallInfo callArray[] = {
  137.     "Proc_Fork",        FALSE,
  138.     "Proc_Exec",                FALSE,
  139.     "Proc_Exit",                FALSE,
  140.     "Sync_WaitTime",            TRUE,
  141.     "Test_PrintOut",            TRUE,    
  142.     "Test_GetLine",             TRUE,
  143.     "Test_GetChar",             TRUE,
  144.     "Fs_OpenStub",              TRUE,
  145.     "Fs_ReadStub",              TRUE,
  146.     "Fs_WriteStub",             TRUE,
  147.     "Fs_UserClose",             TRUE,
  148.     "Fs_RemoveStub",            TRUE,
  149.     "Fs_RemoveDirStub",         TRUE,
  150.     "Fs_MakeDirStub",           TRUE,
  151.     "Fs_ChangeDirStub",         TRUE,
  152.     "Proc_Wait",                FALSE,
  153.     "Proc_Detach",              FALSE,
  154.     "Proc_GetIDs",              FALSE,
  155.     "Proc_SetIDs",              FALSE,
  156.     "Proc_GetGroupIDs",         FALSE,
  157.     "Proc_SetGroupIDs",         FALSE,
  158.     "Proc_GetFamilyID",         FALSE,
  159.     "Proc_SetFamilyID",         FALSE,
  160.     "Test_RpcStub",             TRUE,
  161.     "Test_StatsStub",           TRUE,
  162.     "Vm_CreateVA",              TRUE,
  163.     "Vm_DestroyVA",             TRUE,
  164.     "Sig_UserSend",             FALSE,
  165.     "Sig_Pause",                TRUE,
  166.     "Sig_SetHoldMask",          TRUE,
  167.     "Sig_SetAction",            TRUE,
  168.     "Prof_Start",               TRUE,
  169.     "Prof_End",                 TRUE,
  170.     "Prof_DumpStub",            FALSE,
  171.     "Vm_Cmd",                   FALSE,
  172.     "Sys_GetTimeOfDay",         FALSE,
  173.     "Sys_SetTimeOfDay",         FALSE,
  174.     "Sys_DoNothing",            TRUE,
  175.     "Proc_GetPCBInfo",          FALSE,
  176.     "Vm_GetSegInfo",            TRUE,
  177.     "Proc_GetResUsage",         FALSE,
  178.     "Proc_GetPriority",         FALSE,
  179.     "Proc_SetPriority",         FALSE,
  180.     "Proc_Debug",               FALSE,
  181.     "Proc_Profile",             FALSE,
  182.     "Fs_TruncateStub",          TRUE,
  183.     "Fs_TruncateIDStub",        TRUE,
  184.     "Fs_GetNewIDStub",          TRUE,
  185.     "Fs_GetAttributesStub",     TRUE,
  186.     "Fs_GetAttributesIDStub",   TRUE,
  187.     "Fs_SetAttributesStub",     TRUE,
  188.     "Fs_SetAttributesIDStub",   TRUE,
  189.     "Fs_SetDefPermStub",        TRUE,
  190.     "Fs_IOControlStub",         TRUE,
  191.     "Dev_VidEnable",            FALSE,
  192.     "Proc_SetEnviron",          FALSE,
  193.     "Proc_UnsetEnviron",        FALSE,
  194.     "Proc_GetEnvironVar",       FALSE,
  195.     "Proc_GetEnvironRange",     FALSE,
  196.     "Proc_InstallEnviron",      FALSE,
  197.     "Proc_CopyEnviron",         FALSE,
  198.     "Sync_SlowLockStub",        TRUE,
  199.     "Sync_SlowWaitStub",        TRUE,
  200.     "Sync_SlowBroadcastStub",   TRUE,
  201.     "Vm_PageSize",              TRUE,
  202.     "Fs_HardLinkStub",          TRUE,
  203.     "Fs_RenameStub",            TRUE,
  204.     "Fs_SymLinkStub",           TRUE,
  205.     "Fs_ReadLinkStub",          TRUE,
  206.     "Fs_CreatePipeStub",        TRUE,
  207.     "Vm_MapKernelIntoUser",     FALSE,
  208.     "Fs_AttachDiskStub",        FALSE,
  209.     "Fs_SelectStub",            TRUE,
  210.     "Sys_Shutdown",             FALSE,
  211.     "Proc_Migrate",             FALSE,
  212.     "Fs_MakeDeviceStub",        TRUE,
  213.     "Fs_CommandStub",           FALSE,
  214.     "Fs_LockStub",              TRUE,
  215.     "Sys_GetMachineInfo",     TRUE,
  216.     "Net_InstallRoute",     FALSE,
  217.     "Fs_ReadVector",         TRUE,
  218.     "Fs_WriteVector",         TRUE,
  219.     "Fs_CheckAccess",         TRUE,
  220.     "Proc_GetIntervalTimer",     TRUE,
  221.     "Proc_SetIntervalTimer",     TRUE,
  222.     "Fs_FileWriteBackStub",    TRUE,
  223.     "Proc_ExecEnv",        TRUE,
  224. };
  225.  
  226.  
  227.  
  228. /*
  229.  *----------------------------------------------------------------------
  230.  *
  231.  * main --
  232.  *
  233.  *    Driver.
  234.  *
  235.  * Results:
  236.  *    None.
  237.  *
  238.  * Side effects:
  239.  *    Variable.
  240.  *
  241.  *----------------------------------------------------------------------
  242.  */
  243.  
  244.  
  245. main(argc, argv)
  246.     int argc;
  247.     char *argv[];
  248. {
  249.     ReturnStatus status = SUCCESS;
  250.     char          version[128];
  251.     Boolean migStatus;
  252.  
  253.     Opt_Parse(&argc, argv, numOptions, optionArray);
  254.     if (printVersion) {
  255.     if (Sys_Stats(SYS_GET_VERSION_STRING, sizeof(version), version) ==
  256.         SUCCESS){
  257.         Io_Print("Kernel version: %s\n", version);
  258.         Io_Flush(io_StdOut);
  259.     }
  260.     }
  261.  
  262.     if (debugLevel != -1) {
  263.     status = Sys_Stats(SYS_PROC_MIGRATION, SYS_PROC_MIG_SET_DEBUG,
  264.                (Address) &debugLevel);
  265.     if (status != SUCCESS) {
  266.         Stat_PrintMsg(status, "Sys_Stats (set debug level)");
  267.         Proc_Exit(status);
  268.     }
  269.     }
  270.  
  271.     if (allowMigration || refuseMigration || getMigStatus) {
  272.     status = Sys_Stats(SYS_PROC_MIGRATION, SYS_PROC_MIG_GET_STATUS,
  273.                (Address) &migStatus);
  274.     if (status != SUCCESS) {
  275.         Stat_PrintMsg(status, "Sys_Stats (getting migration status)");
  276.         Proc_Exit(status);
  277.     }
  278.  
  279.     if (allowMigration) {
  280.         status = Sys_Stats(SYS_PROC_MIGRATION, SYS_PROC_MIG_ALLOW,
  281.                    (Address) NULL);
  282.         if (status != SUCCESS) {
  283.         Stat_PrintMsg(status, "Sys_Stats (allow migration)");
  284.         Proc_Exit(status);
  285.         }
  286.         Io_Print("Migration is currently allowed, previously %s.\n",
  287.              migStatus ? "refused" : "allowed");
  288.     } else if (refuseMigration) {
  289.         status = Sys_Stats(SYS_PROC_MIGRATION, SYS_PROC_MIG_REFUSE,
  290.                    (Address) NULL);
  291.         if (status != SUCCESS) {
  292.         Stat_PrintMsg(status, "Sys_Stats (refuse migration)");
  293.         Proc_Exit(status);
  294.         }
  295.         Io_Print("Migration is currently refused, previously %s.\n",
  296.              migStatus ? "refused" : "allowed");
  297.     } else {
  298.         Io_Print("Migration is currently %s.\n",
  299.              migStatus ? "refused" : "allowed");
  300.     }
  301.     }
  302.     if (startTrace) {
  303.     status = Sys_Stats(SYS_PROC_TRACE_STATS, SYS_PROC_TRACING_ON,
  304.             (Address) NULL);
  305.     if (status != SUCCESS) {
  306.         Io_PrintStream(io_StdErr, "Error %x returned from Test_Stats.\n",
  307.                status);
  308.         Stat_PrintMsg(status, "");
  309.         Proc_Exit(status);
  310.     }
  311.     }
  312.  
  313.     if (stopTrace) {
  314.     status = Sys_Stats(SYS_PROC_TRACE_STATS, SYS_PROC_TRACING_OFF,
  315.             (Address) NULL);
  316.     if (status != SUCCESS) {
  317.         Io_PrintStream(io_StdErr, "Error %x returned from Test_Stats.\n",
  318.                status);
  319.         Stat_PrintMsg(status, "");
  320.         Proc_Exit(status);
  321.     }
  322.     }
  323.  
  324.     if (doMigration) {
  325.     status = PrintMigration();
  326.     }
  327.  
  328.     if (countCalls) {
  329.     status = PrintNumCalls();
  330.     }
  331.  
  332.     if (resetCount) {
  333.     status = Sys_Stats(SYS_SYS_CALL_STATS, 0, (Address) NULL);
  334.     }
  335.  
  336.     Proc_Exit(status);
  337. }
  338.  
  339.  
  340. /*
  341.  *----------------------------------------------------------------------
  342.  *
  343.  * PrintMigration --
  344.  *
  345.  *    Print the most recent process migration trace records.
  346.  *
  347.  * Results:
  348.  *    The return status from Test_Stats is returned.
  349.  *
  350.  * Side effects:
  351.  *    Trace records are written to io_StdOut.
  352.  *
  353.  *----------------------------------------------------------------------
  354.  */
  355.  
  356.  
  357. ReturnStatus
  358. PrintMigration()
  359. {
  360.     int index;        /* index of current table entry */
  361.     Time baseTime, deltaTime, startTime;    /* Times for print out */
  362.     Address buffer;    /* Buffer for trace records */
  363.     int numRecs;        /* number of records actually copied */
  364.     Trace_Record *traceArray;
  365.     Proc_TraceRecord *procTraceArray;
  366.     register Trace_Record *tracePtr;
  367.     register Proc_TraceRecord *procTracePtr;
  368.     ReturnStatus status;
  369.     static char *flagsArray[] = {"RE", "RS", "HE", "HS", "  "};
  370.     static char *eventArray[] = {"start", "end", "xfer", "call", "migtrap"};
  371.     static char *commandArray[] = {"proc", "vm", "files", "stream", "user",
  372.                  "resume"};
  373.     /*
  374.      * Get a copy of the trace table.
  375.      */
  376.  
  377.     buffer = Mem_Alloc(sizeof(int) + numRecords *
  378.                (sizeof(Trace_Record) + sizeof(Proc_TraceRecord)));
  379.     status = Sys_Stats(SYS_PROC_TRACE_STATS, numRecords, buffer);
  380.     if (status != SUCCESS) {
  381.     Io_PrintStream(io_StdErr, "Error from Test_Stats.\n");
  382.     Stat_PrintMsg(status, "");
  383.     return(status);
  384.     }
  385.  
  386.     Byte_EmptyBuffer(buffer, int, numRecs);
  387.     Io_PrintStream(io_StdErr, "Number of records is %d.\n", numRecs);
  388.     Io_Flush(io_StdErr);
  389.     if (numRecs == 0) {
  390.     return;
  391.     }
  392.  
  393.     traceArray = (Trace_Record *) buffer;
  394.     procTraceArray = (Proc_TraceRecord *) (buffer + numRecs *
  395.                      sizeof(Trace_Record));
  396.  
  397.  
  398.     Io_Print("\n");
  399. #define PRINT_MIGHEADER() \
  400.     Io_Print("%10s %10s %10s %2s %10s %24s %7s\n", \
  401.     "Time", "Delta", "ProcessID", "HR", "Event", "Call", "Sta")
  402.     PRINT_MIGHEADER();
  403.  
  404.     baseTime = traceArray[0].time;
  405.     startTime = traceArray[0].time;
  406.  
  407.     for (index = 0; index < numRecs; index++) {
  408.     tracePtr = &traceArray[index];
  409.     procTracePtr = &procTraceArray[index];
  410.  
  411.     Time_Subtract(tracePtr->time, startTime, &deltaTime);
  412.     Io_Print(" %3d.%06d",
  413.                deltaTime.seconds,
  414.                deltaTime.microseconds);
  415.     Time_Subtract(tracePtr->time, baseTime, &deltaTime);
  416.     Io_Print(" %3d.%06d",
  417.                deltaTime.seconds,
  418.                deltaTime.microseconds);
  419.     baseTime = tracePtr->time;
  420.  
  421.     if (tracePtr->flags & TRACE_DATA_INVALID) {
  422.         procTracePtr->flags = 4;
  423.         procTracePtr->processID = (Proc_PID) NULL;
  424.     }
  425.     if (((unsigned) procTracePtr->flags) > 3 ||
  426.         ((unsigned) tracePtr->event)  >= PROC_NUM_EVENTS) {
  427.         Io_PrintStream(io_StdErr,
  428.                    "Entry %d: invalid flags (%d) or event (%d).\n",
  429.                    index, procTracePtr->flags, tracePtr->event);
  430.         return(FAILURE);
  431.         }
  432.  
  433.     Io_Print("%10x %3s %10s", procTracePtr->processID,
  434.               flagsArray[procTracePtr->flags],
  435.               eventArray[tracePtr->event]);
  436.  
  437.     if (tracePtr->event == PROC_MIGTRACE_TRANSFER) {
  438.         Io_Print(" %-10s",
  439.              commandArray[(int) procTracePtr->info.command.type]);
  440.         if (procTracePtr->info.command.data != (ClientData) NIL) {
  441.         Io_Print(" %20d",
  442.                    procTracePtr->info.command.data);
  443.         }
  444.     } else if (tracePtr->event == PROC_MIGTRACE_CALL) {
  445.         Io_Print(" %24s",
  446.              callArray[(int) procTracePtr->info.call.callNumber].name);
  447.         if (!(procTracePtr->flags & PROC_MIGTRACE_START)) {
  448.         Io_Print(" %10x",
  449.                    procTracePtr->info.call.status);
  450.         }
  451.     }
  452.  
  453.     Io_Print("\n");
  454.     }
  455.     PRINT_MIGHEADER();
  456.     return(SUCCESS);
  457. }
  458.  
  459.  
  460. /*
  461.  *----------------------------------------------------------------------
  462.  *
  463.  * PrintNumCalls --
  464.  *
  465.  *    Print the number of system calls invoked by processes since the last
  466.  *    time the counter was reset.
  467.  *
  468.  * Results:
  469.  *    The return status from Test_Stats is returned.
  470.  *
  471.  * Side effects:
  472.  *    The number of calls is output.
  473.  *
  474.  *----------------------------------------------------------------------
  475.  */
  476.  
  477.  
  478. ReturnStatus
  479. PrintNumCalls()
  480. {
  481.     Address buffer;    /* Buffer to hold counters */
  482.     ReturnStatus status;
  483.     int i;
  484.     int numForeign = 0;
  485.     int numLocal = 0;
  486.     register int *numCalls;
  487.     int numAlloc;
  488.  
  489.     /*
  490.      * Get a copy of the array of counters.
  491.      */
  492.  
  493.     numAlloc = sizeof(callArray) / sizeof(SysCallInfo);
  494.     buffer = Mem_Alloc(numAlloc * sizeof(int));
  495.     status = Sys_Stats(SYS_SYS_CALL_STATS, numAlloc, buffer);
  496.     if (status != SUCCESS) {
  497.     Stat_PrintMsg(status, "Error from Test_Stats");
  498.     return(status);
  499.     }
  500.     numCalls = (int *) buffer;
  501.  
  502.     for (i = 0; i < numAlloc; i++) {
  503.     Io_Print("%d\t%-30s", numCalls[i], callArray[i].name);
  504.     if (callArray[i].local) {
  505.         numLocal += numCalls[i];
  506.         Io_Print("local\n");
  507.     } else {
  508.         numForeign += numCalls[i];
  509.         Io_Print("remote\n");
  510.     }
  511.     }
  512.     Io_Print("\n\nTotal number of calls: %d local, %d remote.\n",
  513.        numLocal, numForeign);
  514.     Io_Print("%d/%d = %6.2f%% remote.\n",
  515.        numForeign, numForeign + numLocal, 
  516.        ((double) numForeign) / (numForeign + numLocal));
  517.     return(SUCCESS);
  518. }
  519. @
  520.  
  521.  
  522. 1.4
  523. log
  524. @added ability to set and obtain migration status (allowed/refused), 
  525. and changed to use modified option to Sys_Stats.  Removed default
  526. that made printing migration trace records take place if no other
  527. options were specified, 'cause that's dumb.
  528. @
  529. text
  530. @d17 1
  531. a17 1
  532. static char rcsid[] = "$Header: sysStat.c,v 1.3 88/02/21 15:57:08 douglis Exp $ SPRITE (Berkeley)";
  533. d207 1
  534. a217 9
  535.     /*
  536.      * If we're doing an "allowMigration" or "refuseMigration" then
  537.      * get the status after we do it and print out "migration
  538.      * is currently ..."
  539.      */
  540.     if (allowMigration || refuseMigration) {
  541.     getMigStatus = TRUE;
  542.     }
  543.  
  544. d227 1
  545. a227 21
  546.     if (allowMigration) {
  547.     status = Sys_Stats(SYS_PROC_MIGRATION, SYS_PROC_MIG_ALLOW,
  548.                (Address) NULL);
  549.     if (status != SUCCESS) {
  550.         Stat_PrintMsg(status, "Sys_Stats (allow migration)");
  551.         Proc_Exit(status);
  552.     }
  553.     }
  554.  
  555.     if (refuseMigration) {
  556.     status = Sys_Stats(SYS_PROC_MIGRATION, SYS_PROC_MIG_REFUSE,
  557.                (Address) NULL);
  558.     if (status != SUCCESS) {
  559.         Stat_PrintMsg(status, "Sys_Stats (refuse migration)");
  560.         Proc_Exit(status);
  561.     }
  562.     }
  563.  
  564.     if (getMigStatus) {
  565.     Boolean migStatus;
  566.     
  567. d234 23
  568. a256 2
  569.     Io_Print("Migration is currently %s.\n",
  570.          migStatus ? "refused" : "allowed");
  571. a257 1
  572.  
  573. @
  574.  
  575.  
  576. 1.3
  577. log
  578. @Changed the sense of some of the calls (local/remote).  [This change
  579. is OLD!]  Changed the notion of # of calls to use sizeof.  Print
  580. summary line.
  581. @
  582. text
  583. @d6 8
  584. a13 2
  585.  * Copyright 1986 Regents of the University of California
  586.  * All rights reserved.
  587. d17 1
  588. a17 1
  589. static char rcsid[] = "$Header: sysStat.c,v 1.2 87/09/15 16:04:18 brent Exp $ SPRITE (Berkeley)";
  590. d37 3
  591. d53 6
  592. d60 1
  593. a60 1
  594.      "Print process migration statistics (DEFAULT)."},
  595. d70 1
  596. a70 1
  597.      "Print compilation timestamp."},
  598. d83 2
  599. d178 2
  600. d206 1
  601. d210 5
  602. a214 2
  603.     Io_Print("System Stats: %s\n", Version());
  604.     Io_Flush(io_StdOut);
  605. d217 7
  606. a223 3
  607.     if (!(countCalls || startTrace || stopTrace || resetCount)
  608.         && (debugLevel == -1)) {
  609.     doMigration = TRUE;
  610. d227 2
  611. a228 5
  612.     /*
  613.      * Call Test_Stats with a negative value as an argument to indicate
  614.      * debug level rather than # of records.
  615.      */
  616.     status = Sys_Stats(SYS_PROC_TRACE_STATS, -debugLevel, (Address) NULL);
  617. d230 1
  618. a230 3
  619.         Io_PrintStream(io_StdErr, "Error %x returned from Test_Stats.\n",
  620.                status);
  621.         Stat_PrintMsg(status, "");
  622. d233 31
  623. @
  624.  
  625.  
  626. 1.2
  627. log
  628. @Changed around some names (Sys_Stats, etc.) --- ci by FD
  629. @
  630. text
  631. @d11 1
  632. a11 1
  633. static char rcsid[] = "$Header: sysStat.c,v 1.1 87/08/24 10:21:56 brent Exp $ SPRITE (Berkeley)";
  634. d83 1
  635. a83 1
  636.     "Fs_OpenStub",              FALSE,
  637. d87 4
  638. a90 4
  639.     "Fs_RemoveStub",            FALSE,
  640.     "Fs_RemoveDirStub",         FALSE,
  641.     "Fs_MakeDirStub",           FALSE,
  642.     "Fs_ChangeDirStub",         FALSE,
  643. d121 1
  644. a121 1
  645.     "Fs_TruncateStub",          FALSE,
  646. d124 1
  647. a124 1
  648.     "Fs_GetAttributesStub",     FALSE,
  649. d126 1
  650. a126 1
  651.     "Fs_SetAttributesStub",     FALSE,
  652. d128 1
  653. a128 1
  654.     "Fs_SetDefPermStub",        FALSE,
  655. d141 4
  656. a144 4
  657.     "Fs_HardLinkStub",          FALSE,
  658.     "Fs_RenameStub",            FALSE,
  659.     "Fs_SymLinkStub",           FALSE,
  660.     "Fs_ReadLinkStub",          FALSE,
  661. d151 1
  662. a151 1
  663.     "Fs_MakeDeviceStub",        FALSE,
  664. d153 1
  665. a153 1
  666.     "Fs_LockStub",              FALSE,
  667. d155 6
  668. d398 1
  669. d404 3
  670. a406 2
  671.     buffer = Mem_Alloc(SYS_NUM_SYSCALLS * sizeof(int));
  672.     status = Sys_Stats(SYS_SYS_CALL_STATS, SYS_NUM_SYSCALLS, buffer);
  673. d413 1
  674. a413 1
  675.     for (i = 0; i < SYS_NUM_SYSCALLS; i++) {
  676. d425 3
  677. @
  678.  
  679.  
  680. 1.1
  681. log
  682. @Initial revision
  683. @
  684. text
  685. @d11 1
  686. a11 1
  687. static char rcsid[] = "$Header: proto.c,v 1.5 86/09/18 06:35:57 ouster Exp $ SPRITE (Berkeley)";
  688. d16 1
  689. a16 1
  690. #include "rpc.h"
  691. d198 1
  692. a198 1
  693.     status = Test_Stats(PROC_TRACE_STATS, -debugLevel, (Address) NULL);
  694. d208 2
  695. a209 1
  696.     status = Test_Stats(PROC_TRACE_STATS, PROC_TRACING_ON, (Address) NULL);
  697. d219 2
  698. a220 1
  699.     status = Test_Stats(PROC_TRACE_STATS, PROC_TRACING_OFF, (Address) NULL);
  700. d238 1
  701. a238 1
  702.     status = Test_Stats(SYS_CALL_STATS, 0, (Address) NULL);
  703. d284 1
  704. a284 2
  705.     status = Test_Stats(PROC_TRACE_STATS, numRecords,
  706.                      buffer);
  707. d398 1
  708. a398 1
  709.     status = Test_Stats(SYS_CALL_STATS, SYS_NUM_SYSCALLS, buffer);
  710. @
  711.